<?xml version="1.0" encoding="UTF-8"?>
<!--
Proyecto fin de master. Servicio de alertas 112
Jorge Tarancon Iglesias
Master en desarrollo de aplicaciones para Internet y Moviles
-->
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="../include/template_1.xhtml">

    <ui:define name="title">
        <h:outputText value="#{MyBundle.UserInfo}"/>
    </ui:define>

    <ui:define name="body">

        <p:growl id="growlIndex" sticky="true" />

        <h:form id="UsersEditForm"> 
            <h:panelGroup id="display">
                <p:panelGrid  columns="2" columnClasses="column">

                    <h:outputLabel value="#{MyBundle.EditUsersLabel_user}" for="user" />
                    <h:outputText id="user" value="#{login.user.user}" />

                    <p:outputLabel value="#{MyBundle.EditUsersLabel_password}" for="password" />
                    <p:inputText id="password" value="#{login.user.password}" title="#{MyBundle.EditUsersTitle_password}" required="true" requiredMessage="#{MyBundle.EditUsersRequiredMessage_password}" size="10" maxlength="10"/>

                    <p:outputLabel value="#{MyBundle.EditUsersLabel_email}" for="email" />
                    <p:inputText id="email" value="#{login.user.email}" title="#{MyBundle.EditUsersTitle_email}" required="true" requiredMessage="#{MyBundle.EditUsersRequiredMessage_email}" size="50" maxlength="50"/>

                </p:panelGrid>

                <p:commandButton action="#{login.edit}" value="#{MyBundle.Save}" update=":growlIndex"/>

                <p:button value="#{MyBundle.Cancel}" outcome="/alerts/index.xhtml"/>

            </h:panelGroup>
        </h:form>

    </ui:define>

</ui:composition>